/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gui;
import java.awt.*;

import javax.swing.*;
import javax.swing.table.*;

public class CustomTableCellRenderer extends DefaultTableCellRenderer {

    private JLabel label = null;
    private ImageIcon icon = null;

    public CustomTableCellRenderer(JLabel a)
    {
        //this.label = a;
        this.setText(a.getText());
        this.setIcon(a.getIcon());
    }
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
    {
        Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
        Component component = (Component) value;
        if (isSelected)
        {
            component.setBackground(new Color(185, 209, 234));
        }
        else
        {
            component.setBackground(Color.WHITE);
        }

        return component;
    }



}


